//
//  AddressModel.m
//  JinFuThree
//
//  Created by 毛韶谦 on 2018/9/4.
//  Copyright © 2018年 毛韶谦. All rights reserved.
//

#import "AddressModel.h"

@implementation AddressModel

- (void)setValue:(id)value forKey:(NSString *)key {
    
    self.isSelect = @"0";
    if ([key isEqualToString:@"label"]) {
        self.label = [NSString stringWithFormat:@"%@",value];
    }else if ([key isEqualToString:@"value"]) {
        self.value = [NSString stringWithFormat:@"%@",value];
    }else if ([key isEqualToString:@"children"]) {
        self.children = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            AddressModel *model = [[AddressModel alloc] init];
            [model setValuesForKeysWithDictionary:dic];
            [self.children addObject:model];
        }
    }
}
@end
